package bma.shop.web.event;

import com.vaadin.event.EventRouter;

public class EventManager {
	private EventRouter router = new EventRouter();
	
	public void subscribe(Class<? extends BaseEvent> event, ViewEventListener target) {
		router.addListener(event, target, "handleEvent");
	}
	
	public void publish(BaseEvent event) {
		router.fireEvent(event);
	}
}
